//
//  DDLoginUserManager.h
//  DingDongZP
//
//  Created by 王威 on 16/3/23.
//  Copyright © 2016年 iyhjiang.com. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface DDLoginUserManager : NSObject


#pragma mark - User Base info

/**
 *  判断是否第一次打开app
 */
+ (BOOL)isFirstLaunch;
+ (void)setFistLaunch:(BOOL)yesorno;

/**
 *  判断是否已登录
 */
+ (BOOL)isLogin;

+ (void)clearLoginInfo;

/**
 *   uid
 *
 *  @return uid
 */
+ (NSString *)userID;
+ (void)setUserID:(NSString *)userID;

/**
 *  user nickname
 *
 *  @return nickname
 */

+ (NSString *)nickname;
+ (void)setNickname:(NSString *)nickname;

+ (NSString *)avatar;
+ (void)setAvatar:(NSString *)avatar;

+ (NSString *)email;
+ (void)setEmail:(NSString *)email;

+ (NSString *)account;
+ (void)setAccount:(NSString *)account;

+ (NSString *)password;
+ (void)setPassword:(NSString *)password;

//用户头像
+ (NSString *)ddportrait;
+ (void)setDdportrait:(NSString *)ddportrait;

/**
 *  每次请求接口需要用到的token
 *
 *  @return
 */
+ (NSString *)token;
+ (void)setToken:(NSString *)token;

+ (NSString *)weixin;
+ (void)setWeixin:(NSString *)weixin;

+ (NSString *)phone;
+ (void)setPhone:(NSString *)phone;

// 用户姓名
+ (NSString *)accountName;
+ (void)setAccountName:(NSString *)accountName;

// 用户姓名登录跟Token一起获取
+ (NSString *)accountNamefirst;
+ (void)setAccountNamefirst:(NSString *)accountNamefirst;

+ (id)objectFromUserDefaultsKey:(NSString *)key;
+ (void)saveToUserDefaultsObject:(id)object forKey:(NSString *)key;
+ (void)saveToUserDefaultsBOOL:(BOOL)boolValue forKey:(NSString *)key;
@end
